From f1e5d563be5ba50a0ea2ded279120c5547334e82 Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 1 Jul 2005 05:53:53 +0000 Subject: [PATCH] Copy placer data when in waypt_dupe. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1270 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/waypt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gpsbabel/waypt.c b/gpsbabel/waypt.c index ee8b43355..87731cd66 100644 --- a/gpsbabel/waypt.c +++ b/gpsbabel/waypt.c @@ -36,6 +36,9 @@ waypt_init(void) waypoint * waypt_dupe(const waypoint *wpt) { + /* + * This and waypt_free should be closely synced. + */ waypoint * tmp; tmp = waypt_new(); memcpy(tmp, wpt, sizeof(waypoint)); @@ -60,6 +63,10 @@ waypt_dupe(const waypoint *wpt) tmp->gc_data.desc_long.utfstring = xstrdup(tmp->gc_data.desc_long.utfstring); } + if (wpt->gc_data.placer) { + tmp->gc_data.placer = xstrdup(wpt->gc_data.placer); + } + /* * It's important that this duplicated waypoint not appear * on the master Q. @@ -249,6 +256,9 @@ find_waypt_by_name(const char *name) void waypt_free( waypoint *wpt ) { + /* + * This and waypt_dupe should be closely synced. + */ if (wpt->shortname) { xfree(wpt->shortname); } -- 2.30.2